<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html lang="zh-CN">
  <head>
    <base href="<%=basePath%>">
    
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <title>设计云注册</title>
    
	<link href="lib/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet">
	<link href="designCloud/css/common.css" rel="stylesheet"></link>
	<link href="designCloud/css/login.css" rel="stylesheet"></link>
	
	<!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
  </head>
  
  <body class="indexBody">
  	<div class="indexBox">
  		<form class="indexForm registerForm" action="">
  			<div class="index-title">注册页面</div>
  			
  			<div class="reg-identity clearfix">
  				<div id="reg-person" class="reg-idLeft idActive">设计个人</div>
  				<div id="reg-firm" class="reg-idRight">设计公司</div>
  				<input id="reg-role" type="hidden" name="" value="1"/>
  			</div>
  			
			<div class="list-box">
				<div class="list-tr">
					<input type="text" name="registerNumber" id="registerNumber" placeholder="用户名/手机号" />
				</div>
				<div class="list-tr">
					<input type="password" name="registerPass" id="registerPass" placeholder="密码" />
				</div>
				<div class="list-tr2">
					<input type="text" name="VBR" id="VBR" placeholder="动态码" />
					<a href="javascript:;" class="a-white btn1">获取动态码</a>
				</div>
			</div>
			
			<div class="handle-bar">
				<div class="rememberPass">
					<input name="" type="checkbox" value="" checked="checked">
					<a class="a-black" href="javascript:;">会员协议</a>
				</div>
			</div>
			
			<div class="foot-box btn1" id="registerSure">
				<a class="foot-butten a-white" href="javascript:;">注册</a>
			</div>
			
			<div class="error-resgister">
				<span id="errorContent"></span><!-- 错误提示 -->
			</div>
			
			<div class="bottom-bar">
				<div class="bottom-line"></div>
				<a class="bottom-btn" href="designCloud/login.jsp">立即登录</a>
			</div>
  		</form>
  		
  		<div id="copyrightPageBox"></div>
  	</div>
  	
  	<script src="lib/jquery/1.11.3/jquery.min.js"></script>
  	<script src="designCloud/js/copyright.js"></script>
  	
  	<script type="text/javascript">
		$(document).ready(function(){
			idToggle(); 
			registerSure();
		});
		
		function idToggle(){
			$("#reg-person").click(function(){
				$(this).addClass("idActive");
				$("#reg-firm").removeClass("idActive");
				$("#reg-role").val(1);//设计个人为1;设计公司为2
			});
			$("#reg-firm").click(function(){
				$(this).addClass("idActive");
				$("#reg-person").removeClass("idActive");
				$("#reg-role").val(2);
			});
		}
		
		function registerSure(){
			$("#registerSure").click(function(){
				var registerNumber=$("#registerNumber").val();
				var registerPass=$("#registerPass").val();
				var VBR=$("#VBR").val();
				
				if(registerNumber=="" || registerPass=="" || VBR==""){
					$(".error-resgister").css("display","block");
					$("#errorContent").text("您所填信息不完整！");
				}
				else{
					$("#errorContent").text("");
					$("#registerSure a").text("注册中...");
					window.location.href="designCloud/console/userManage.jsp";
				}
				
			});
		
		}
</script>
    
  </body>
</html>
